package main

import (
	"github.com/tal-tech/go-zero/core/conf"
	"github.com/tal-tech/go-zero/zrpc"
	"google.golang.org/grpc"
	"guli-shopping/member-service/protobuff/memberProto"
	"guli-shopping/member-service/service"
	"guli-shopping/product-service/config"
)

var configPath string = "./config/application.yml"

func main() {
	//加载配置文件
	config := config.GetConfig()
	conf.MustLoad(configPath, config)
	UmsMemberLevelService := &service.UmsMemberLevelService{}

	server := zrpc.MustNewServer(config.RpcServerConf, func(server *grpc.Server) {
		memberProto.RegisterUmsMemberLevelCheckerServer(server,UmsMemberLevelService)
	})
	defer server.Stop()
	server.Start()
}
